//
//  CascadeListView.h
//  etionRichText
//
//  Created by wangjian on 11/15/13.
//
//

#import <UIKit/UIKit.h>
#import "CascadeData.h"

@interface CCascadeListCell : UITableViewCell

- (void)updateWithData:(CCascadeSelectorCellData *)data animated:(BOOL)animated;
- (void)updateForType:(ECascadeSelectorCellDataType)type selected:(BOOL)selected animated:(BOOL)animated;

@end

@class CCascadeListView;
@protocol CCascadeListViewDelegate <NSObject>

- (void)cascadeListView:(CCascadeListView *)listView didClickCell:(CCascadeListCell *)cell forData:(CCascadeSelectorCellData *)data;

@optional
- (void)cascadeListView:(CCascadeListView *)listView didScrollToOffset:(CGPoint)offset;
- (void)cascadeListView:(CCascadeListView *)listView didEndDragAtOffset:(CGPoint)offset;

@end

@interface CCascadeListView : UIView

@property (nonatomic, assign) id<CCascadeListViewDelegate> delegate;

- (void)setCellItems:(NSArray *)arItems;
- (void)setEdgeInsets:(UIEdgeInsets)edgeInsets;
- (CCascadeListCell *)cellAtIndexPath:(NSIndexPath *)indexPath;
- (void)filterWithCondition:(NSString *)condition;
- (void)scrollToMakeItemVisible:(CCascadeSelectorCellData *)data animated:(BOOL)animated;

@end


